package org.hk.kg.finance.stutype.action;

import org.hk.kg.db.DBServiceProxy;
import org.hk.kg.finance.stutype.service.IStuTypeService;
import org.hk.kg.finance.stutype.service.StuTypeService;
import org.hk.kg.ui.ParamsStack;
import org.hk.kg.utils.Constants;
import org.hk.kg.web.BaseAction;

public class NewStuTypeAction extends BaseAction {
	private IStuTypeService stuTypeServ = DBServiceProxy.getProxyClz(StuTypeService.class);
	public String doCreate(ParamsStack params)
	{
		String typeName = params.getValue("stuTypeName"),
			typeDesc = params.getValue("stuTypeDesc");
		if(stuTypeServ.createStuType(typeName, typeDesc))
		{
			return "stu_type_page";
		}
		else
		{
			return Constants.COMMON_FAIL_ACTION;
		}
	}
}
